package com.visikard.response;

import org.json.JSONException;
import org.json.JSONObject;

public class CreateCpResponse extends BaseResponse {
	private int couponId;

	public void setCouponId(int couponId) {
		this.couponId = couponId;
	}

	public int getCouponId() {
		return couponId;
	}

	@Override
	public void extractDataFromServer(String response) throws JSONException {
		super.extractDataFromServer(response);

		// response OK
		if (errorCode == SUCCESS) {

			JSONObject jsonObject = new JSONObject(response);

			couponId = jsonObject.optInt("data");

		}

	}
}